import request from "@/utils/request";

/** 文书类别表单 */
export interface InsCategoryForm {
  id?: number;
  typeName?: string;
  category?: string;
}
/** 文书类别对象 */
export interface InsCategoryVO {
  category?: string;
  createdAt?: string;
  id?: number;
  updateAt?: string;
}
class insCategoryAPI {
  /** 获取分页文书类别列表 */
  static getInsCategory() {
    return request<any, InsCategoryVO[]>({
      url: "/api/ins/category",
      method: "get",
      // data: params,
    });
  }
  /** 新增+修改 文书类别列表 */
  static updateInsCategory(params: InsCategoryForm) {
    return request<any, InsCategoryVO[]>({
      url: "/api/ins/category",
      method: "post",
      data: params,
    });
  }
  /** 删除文书类别列表 */
  static deleteInsCategory(id: string) {
    return request({
      url: `/api/ins/category/${id}`,
      method: "delete",
      // data: params,
    });
  }
}

export default insCategoryAPI;
